package router

import (
	"gitee.com/bingshiwuyu/trace-source/handler"
	"github.com/gin-gonic/gin"
)

func Load(g *gin.Engine, mw ...gin.HandlerFunc) {
	g.Use(gin.Recovery())
	g.Use(mw...)

	fileRoutes := g.Group("/v1")
	{
		fileRoutes.POST("/trace/add", handler.UpdateHandler)
		fileRoutes.GET("/trace/get", handler.TraceGetHandler)
	}
	g.Run(":8082")
}
